package com.wx.subject.infra.basic.service.impl;



import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.wx.subject.infra.basic.entity.SubjectCategory;
import com.wx.subject.infra.basic.mapper.SubjectCategoryDao;
import com.wx.subject.infra.basic.service.SubjectCategoryService;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;



/**
 * 题目分类(SubjectCategory)表服务实现类
 *
 * @author makejava
 * @since 2024-03-04 22:46:23
 */

@Service
public class SubjectCategoryServiceImpl extends ServiceImpl<SubjectCategoryDao,SubjectCategory> implements SubjectCategoryService  {
    @Resource
    private SubjectCategoryDao subjectCategoryDao;

    /**
     * 通过ID查询单条数据
     *
     * @param id 主键
     * @return 实例对象
     */
    @Override
    public SubjectCategory queryById(Long id) {

        return subjectCategoryDao.queryById(id);
    }







    /**
     * 通过主键删除数据
     *
     * @param id 主键
     * @return 是否成功
     */
    @Override
    public boolean deleteById(Long id) {
        return subjectCategoryDao.deleteById(id) > 0;
    }
}
